module.exports = (doc, req, resolve) => {
    req.session.customer = {
        phone: doc.phone,
        alipay: doc.alipay,
        wechatQrcode: doc.wechatQrcode,
        isPromoter: doc.isPromoter,
        returnWay: doc.returnWay || 'wechat'
    }
    if (['18820005776', '13632194032'].indexOf(doc.phone) == -1) {
        resolve({
            result: 1,
            phone: doc.phone,
            alipay: doc.alipay,
            wechatQrcode: doc.wechatQrcode,
            isPromoter: doc.isPromoter,
            returnWay: doc.returnWay
        })
    } else {
        req.session.admin = {
            phone: doc.phone
        }
        resolve({
            result: 1,
            phone: doc.phone,
            isAdmin: 1,
            alipay: doc.alipay,
            wechatQrcode: doc.wechatQrcode,
            isPromoter: doc.isPromoter,
            returnWay: doc.returnWay
        })
    }
}